/******************** 变量 ********************/
$transfer-empty-padding: 0.52rem;

.lv-transfer {
  position: relative;
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 100%;
  color: $text-color;
  font-size: $font-size-base;
  font-family: $font-family;
  line-height: $line-height-base;
}

.lv-transfer-content {
  width: 100%;
}

.lv-transfer-panel {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: $transfer-panel-background;
  border: $border-width-base $border-style-base $border-color-base;
  border-radius: $border-radius-md;

  &.lv-transfer-panel-default {
    width: 50%;
  }
}

.lv-transfer-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: $height-lg;
  padding: 0 $padding-sm;
  background: $transfer-panel-title-background;
  border-bottom: $border-width-base $border-style-base $border-color-base;

  .lv-transfer-panel-title-content {
    display: flex;
    align-items: center;
    width: 100%;
    height: $height-lg;
    overflow: hidden;
  }

  .lv-transfer-panel-title-item {
    display: flex;
    align-items: center;
    max-width: 100%;
    overflow: hidden;
    cursor: pointer;

    &.active {
      .lv-transfer-panel-title-info {
        color: $primary-color;
      }
    }

    .lv-transfer-panel-title-info {
      color: $text-color-tertiary;
      font-weight: $font-weight-regular;
    }
  }

  .lv-transfer-panel-title-info {
    margin-right: $margin-sm;
    color: $text-color;
    font-weight: $font-weight-bold;
  }

  .lv-transfer-panel-title-delimiter {
    width: 0.01rem;
    height: 0.1rem;
    margin: 0 $margin-sm;
    background: $border-color-disabled;
  }

  .lv-transfer-panel-header-operate {
    flex-shrink: 0;
    margin-left: $margin-lg;
  }
}

.lv-transfer-panel-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.lv-transfer-panel-header {
  padding: $padding-xs $padding-sm;
  box-shadow: inset 0 0.01rem 0 0 $separate-line-color;
}

.lv-transfer-panel-body {
  flex-grow: 1;
  overflow: auto; // TODO:引起不出现滚动条场景会显示滚动条，再隐藏

  @include component-scroll;

  .lv-table-thead > tr > th {
    background: transparent;
    border-top: none;

    &:nth-last-child(2) .lv-table-th-deliver {
      display: none;
    }

    &.lv-transfer-table-checkbox-th {
      .lv-table-th-deliver {
        display: none;
      }
    }
  }

  .lv-table-thead > tr > th:first-child,
  .lv-table-tbody > tr.lv-table-row > td:first-child {
    padding-left: $padding-sm;
  }

  .lv-transfer-item-remove {
    cursor: pointer;
    float: right;
  }

  .lv-table-tbody > tr.lv-table-row > .lv-transfer-item-remove-td {
    padding: 0;
  }
}

.lv-transfer-default .lv-transfer-panel-body {
  min-height: 2.32rem;
}

.lv-transfer-small .lv-transfer-panel-body {
  min-height: 1.92rem;
}

.lv-transfer-large .lv-transfer-panel-body {
  min-height: 3.12rem;
}

.lv-transfer-panel-footer {
  position: relative;
  display: flex;
  align-items: center;
  padding: 0 $padding-sm;

  &::before {
    position: absolute;
    top: -0.01rem;
    left: 0;
    width: 100%;
    content: '';
  }

  &.lv-transfer-panel-customer-footer,
  &.lv-transfer-panel-has-page {
    min-height: $height-lg;

    &::before {
      height: 0.01rem;
      box-shadow: inset 0 0.01rem 0 0 $separate-line-color;
    }
  }

  .lv-transfer-panel-footer-page {
    width: 100%;
  }

  .lv-paginator {
    padding: 0;
  }
}

.lv-transfer-operation {
  .lv-button.lv-button-size-default {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 0.24rem;
    min-width: auto;
    padding: 0;
  }
}

.lv-transfer-arrow-next {
  width: 0.16rem;
  min-width: 0.16rem;
  height: 0.16rem;
  min-height: 0.16rem;
}

// 表格
lv-transfer-table {
  display: block;
}

.lv-transfer-table-has-col-control,
.lv-transfer-table-has-remove {
  .lv-table-thead > tr > th:nth-last-child(2) .lv-table-th-deliver {
    display: none;
  }
}

.lv-transfer-table-has-col-control.lv-transfer-table-has-remove .lv-table-thead > tr > th:nth-last-child(3) .lv-table-th-deliver {
  display: none;
}

.lv-transfer-table-control-item {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 0.16rem;
  height: 0.3rem;
  border-left: $border-width-base $border-style-base $transfer-table-control-item-border-color;
  cursor: pointer;
}

.lv-transfer-table-customer-filter {
  line-height: 0;
}

.lv-transfer-table-search {
  width: 2rem;
}

.lv-transfer-panel-none {
  display: none;
}

// 空数据
.lv-transfer-placeholder {
  &.lv-transfer-null {
    padding: $transfer-empty-padding 0;
  }
}
